Merge branch 'update-service-files-of-openrc-and-systemd-to-new-recommended-paths...
[akkoma] / lib / pleroma / flake_id.ex
index 3623ac597255a1c8d1ceead66f04e0eeca2f5827..69ab8ccf929f10184968a009f76fce5aa3384392 100644 (file)
@@ -33,6 +33,10 @@ defmodule Pleroma.FlakeId do
 
   def to_string(s), do: s
 
+  def from_string(int) when is_integer(int) do
+    from_string(Kernel.to_string(int))
+  end
+
   for i <- [-1, 0] do
     def from_string(unquote(i)), do: <<0::integer-size(128)>>
     def from_string(unquote(Kernel.to_string(i))), do: <<0::integer-size(128)>>